using System;
using System.Collections.Generic;
using System.Text;
using System.Xml.Serialization;

namespace DeliciousAPI
{
    public class PostConstants
    {
        public const string __NO_TAG = "system:unfiled";
    }
    
    [XmlRoot("posts")]
    public class PostCollection
    {
        public PostCollection()
        {
            Posts = new List<Post>();
        }
        
        [XmlAttribute("update")]
        public DateTime Date;

        [XmlAttribute("tag")]
        public string Tag;

        [XmlAttribute("user")]
        public string User;

        [XmlElement("post")]
        public List<Post> Posts;
    }
    
    public class Post
    {
        [XmlAttribute("href")]
        public string Href;

        [XmlAttribute("description")]
        public string Description;

        [XmlAttribute("extended")]
        public string Extended;

        [XmlAttribute("hash")]
        public string Hash;

        [XmlAttribute("others")]
        public int Others;

        [XmlAttribute("tag")]
        public string Tag;

        [XmlAttribute("time")]
        public string Time;
    }
}
